1. Field of the Invention
This invention relates to a method and apparatus for transcoding video signals from a first format into a second format.
2. Related Art
Many techniques for compression of video signals are known. Broadcast quality television requires in excess of 100 Mbit/s when transmitted in digital form, which is expensive to transmit and requires links of high bandwidth. Known compression coding techniques may be used which take advantage of the high degree of spatial and/or temporal redundancy in the video signals being encoded. So, for example, in videoconferencing applications, compression down to a bit rate of a few hundred kilobits per second is possible whereas videotelephone quality pictures including sound can be compressed down to only 64 kilobits per second, equivalent to a single telephone channel.
One known compression technique is predictive coding which exploits the assumption that a picture element (pixel) within a frame is related to neighbouring pixels in the same frame (spatial prediction) or a different frame (temporal prediction) and that the value of a pixel may therefore be predicted at a receiver instead of full information about the pixel being transmitted. It is only necessary to transmit the prediction error arising from such an assumption. For instance the first pixel of a frame may be transmitted exactly with each subsequent pixel being transmitted as the difference between it and its predecessor.
To reduce further the amount of information needed to be transmitted, a technique known as motion compensation may be used in which a picture is divided into blocks of pixels and each block of a current frame is compared with a corresponding block of a reference frame, which may be a previous or a subsequent frame, and with shifted positions of that block, and the region of the reference frame which the block most closely resembles is identified. The vector difference in position between the identified region and the block in question is termed a motion vector and is used to shift the identified region of the reference frame into the position of the relevant block in the current frame. Motion vectors are generated for most or all the blocks of a current frame and are used to derive a predicted frame from the reference frame(s). The differences between the current and predicted frame are, on average, smaller than those between the current and reference frame and can be encoded using less data. A decoder which already has the reference frames stored can thus reproduce the current frame using the motion vectors and the difference values. A signal may be coded using any of the aforementioned coding techniques either separately or in combination.
There are circumstances when it is desirable to employ a transcoder which receives a signal encoded according to a first coding scheme and outputs an encoded data stream encoded according to a second scheme. If one has a decoder which operates according to the second coding scheme then such a transcoder would allow the decoding of a signal encoded according to the first coding scheme without modifying the original encoder or the ultimate decoder
Known transcoders generally decode a signal encoded according to a first coding scheme into an uncompressed signal which is then encoded by an encoder according to the second coding scheme to output a new data stream. Thus a full decoding operation is carried out to reconstitute the original video signal and then this video signal is encoded to provide a new coded data stream according to the second coding scheme. For coding methods involving motion compensation new motion vectors are generated for the signal encoded according to the second coding scheme and this accounts for a large proportion of the processing time of conventional transcoders. Transcoders are generally assumed not to exist in a transmission path i.e. a video signal encoded according to the H.261 standard is assumed to be received by a decoder conforming to the H.261 standard: the introduction of a transcoder into the transmission path will introduce delay into the path which delay may be unacceptable.
International patent application WO95/29561 describes a transcoder which receives a signal encoded according to a first coding scheme employing motion compensation and outputs a signal encoded according to a second coding scheme which also employs motion compensation, the motion vectors being extracted from the received video signal and transferred to the output signal. Thus, it is not necessary to recalculate the motion vectors for the second coding scheme. However this scheme presupposes that the received signal contains motion vectors suitable for use in the second coding scheme.
According to the present invention there is provided a transcoder comprising a decoder for decoding a received video signal coded according to a first coding scheme, and an encoder for reencoding the signal according to a second coding scheme, said coding schemes being such that at least some frames are coded using motion-compensated inter-frame predictive coding based on a reference frame which is not the same in the second coding scheme as it is in the first coding scheme, wherein that the transcoder includes motion vector processing means to generate an estimated motion vector for a current frame of the video signal, the motion vector processing means being connected to receive, when processing vectors for a current frame, vectors which, in the received signal, accompany at least one other frame of the video signal.
In another aspect, the invention provides a transcoder comprising a decoder for decoding a received video signal , said received signal being coded according to a first coding scheme employing motion compensation and comprising coded data and motion compensation information, and an encoder for encoding the output of the decoder according to a second coding scheme employing motion compensation, the encoder including motion estimation means for generating motion compensation information, wherein the motion estimation means is arranged to receive motion compensation information obtained from the received signal and to carry out motion estimation within a search area centred on the received motion compensation information, wherein, for use where at least some frames are coded using motion-compensated inter-frame predictive coding based on a reference frame which is not the same in the second coding scheme as it is in the first coding scheme, the transcoder includes motion vector processing means to generate an estimated motion vector for a current frame of the video signal, the motion vector processing means being connected to receive, when processing vectors for a current frame, vectors which, in the received signal, accompany at least one other frame of the video signal, and the motion estimation means being connected to receive the said estimate.
In a further aspect, the invention provides a method of transcoding a received video signal coded according to a first coding scheme into a signal according to a second coding scheme, said coding schemes being such that at least some frames are coded using motion-compensated inter-frame predictive coding based on a reference frame which is not the same in the second coding scheme as it is in the first coding scheme, characterised by processing received motion vectors to generate an estimated motion vector for a current frame of the video signal, the processing step being responsive, when processing vectors for a current frame, vectors which, in the received signal, accompany at least one other frame of the video signal.
In yet another aspect of the invention there is provided a method of transcoding a signal representing a two-dimensional array, the method comprising decoding a received signal encoded according to a first coding scheme employing motion compensation, said signal comprising coded data and motion compensation information, and encoding the decoded output according to a second coding scheme employing motion compensation, the encoding including generating motion compensation information by carrying out motion estimation within a search area centred on motion compensation information obtained from the received signal, wherein, for use where at least some frames are coded using motion-compensated inter-frame predictive coding based on a reference frame which is not the same in the second coding scheme as it is in the first coding scheme, the method includes the step of motion vector processing to generate an estimated motion vector for a current frame of the video signal, the processing step being responsive, when processing vectors for a current frame, vectors which, in the received signal, accompany at least one other frame of the video signal, and the motion estimation serving to perform estimation within a search area centred on a position determined by the said estimate.